package org.darkforest.common.services.impl;

import org.darkforest.common.services.WaybillService;
import org.darkforest.dao.mapper.WaybillMapper;
import org.darkforest.model.Waybill;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by huayunsky on 12/17/2015.
 */

@Service
public class WaybillServiceImpl implements WaybillService{

    @Autowired
    WaybillMapper waybillMapper;

    @Override
    public Waybill selectByCondition(Waybill record) {
        record.setResultList(waybillMapper.selectByCondition(record));
        return record;
    }

    @Override
    public int insert(Waybill record) {
        return waybillMapper.insert(record);
    }

    @Override
    public int updateByPrimaryKeySelective(Waybill record) {
        return waybillMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public Waybill selectByPrimaryKey(Integer waybillId) {
        return waybillMapper.selectByPrimaryKey(waybillId);
    }

    @Override
    public int deleteByPrimaryKey(Integer waybillId) {
        return waybillMapper.deleteByPrimaryKey(waybillId);
    }
}
